
package trim.differentmaterials.coefficients;

import java.util.*;
import trim.differentmaterials.generator.columns.*;

/**
 *
 * @author Podorov Alexander
 */

public class NremUremCoefficients implements Coefficients
{
    private final Map<Class, Coefficient> gaps;

    public NremUremCoefficients()
    {
        gaps = new HashMap<Class, Coefficient>();

        gaps.put(RealPattern.class, new Coefficient() {
            public int getValue(boolean isArtificialMode)
            {
                return 0;
            }
        });
        gaps.put(PositiveFormatGap.class, new Coefficient() {
            public int getValue(boolean isArtificialMode)
            {
                return isArtificialMode ? 0 : 1;
            }
        });
        gaps.put(NegativeFormatGap.class, new Coefficient() {
            public int getValue(boolean isArtificialMode)
            {
                return isArtificialMode ? 0 : 1;
            }
        });
        gaps.put(ArtificialColomn.class, new Coefficient() {
            public int getValue(boolean isArtificialMode)
            {
                return isArtificialMode ? 1 : 0;
            }
        });
    }

    public Coefficient getCoefficient(Class colomn)
    {
        return gaps.get(colomn);
    }
}
